<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">培训分类管理</h1>
</div>
<div class="wrapper-md" ng-controller="TrainningCategoryCtrl">
    <p>
        <button class="btn btn-primary" ng-click="createOrUpdate({Id:0})"><i class="fa fa-plus"></i> 新增</button>
    </p>
    <div class="row  m-md scroll">
       <table class="table table-hoverd">
           <tr>
               <th>Id</th>
               <th>分类名称</th>
               <th>状态</th>
               <th>创建人</th>
               <th>创建时间</th>
               <th>更新人</th>
               <th>更新时间</th>
               <th>操作</th>
           </tr>
           <tr ng-repeat="item in categoryList" ng-class="{'text-red':!item.Enabled}">
               <td>{{item.Id}}</td>
               <td>{{item.Name}}</td>
               <td>{{item.Enabled?'正常':'停用'}}</td>
               <td>{{item.CreateUser}}</td>
               <td>{{item.CreateTime|date:'yyyy-MM-dd HH:mm'}}</td>
               <td>{{item.UpdateUser}}</td>
               <td>{{item.UpdateTime|date:'yyyy-MM-dd HH:mm'}}</td>
               <td>
                   <a href="javascript:;" ng-click="createOrUpdate(item)"><i class="fa fa-edit"></i>编辑</a>
                   <a href="javascript:;" ng-click="enable(item)"><i class="fa" ng-class="{'fa-arrow-up':!item.Enabled,'fa-arrow-down':item.Enabled}"></i>{{item.Enabled?'停用':'启用'}}</a>
               </td>
           </tr>
        </table>
    </div>
</div>